package im.beans;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name="t_IM_Message")
public class Message {

	private long id;
	
	// 发送消息者id
	long from_id;
    // 发送消息者
    String fromName;
    // 接受消息者id
    long to_id;
    // 接受消息者名
    String toName;
    // 消息类型
    int type;
    // 消息是文件，地址
    String fileURI;
    // 文件名
    String fileName;
    // 是本机文件？
    int local;
    // 消息文本
    String text;
    // 时间戳
    String timestamp;
    
    // 是否已读
    boolean isRead;
    
    @Id
    @GeneratedValue
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public long getFrom_id() {
		return from_id;
	}
	public void setFrom_id(long from_id) {
		this.from_id = from_id;
	}
	public String getFromName() {
		return fromName;
	}
	public void setFromName(String fromName) {
		this.fromName = fromName;
	}
	public long getTo_id() {
		return to_id;
	}
	public void setTo_id(long to_id) {
		this.to_id = to_id;
	}
	public String getToName() {
		return toName;
	}
	public void setToName(String toName) {
		this.toName = toName;
	}
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	public String getFileURI() {
		return fileURI;
	}
	public void setFileURI(String fileURI) {
		this.fileURI = fileURI;
	}
	public String getFileName() {
		return fileName;
	}
	public void setFileName(String fileName) {
		this.fileName = fileName;
	}
	public int getLocal() {
		return local;
	}
	public void setLocal(int local) {
		this.local = local;
	}
	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	public String getTimestamp() {
		return timestamp;
	}
	public void setTimestamp(String timestamp) {
		this.timestamp = timestamp;
	}
	public boolean getIsRead() {
		return isRead;
	}
	public void setIsRead(boolean isRead) {
		this.isRead = isRead;
	}
    
    
}
